//
//  ZJLiveViewController.m
//  zjzb
//
//  Created by Mac on 2017/3/24.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import "ZJLiveViewController.h"
#import "LFLivePreview.h"
@interface ZJLiveViewController ()
@property(nonatomic,strong)LFLivePreview * preView;
@end

@implementation ZJLiveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    
    [SVProgressHUD showWithStatus:@"进房间中"];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        LFLivePreview * preView = [[LFLivePreview alloc] initWithFrame:self.view.bounds];
        preView.vc = self;
        [self.view addSubview:preView];
        
        //开启直播
        [preView startLive];
        [SVProgressHUD dismiss];
    });
  

    
       // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
     self.navigationController.navigationBarHidden = YES;
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
      self.navigationController.navigationBarHidden = NO;
}



@end
